<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>宿舍管理系统</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="{{asset('css/font.css')}}">
    <link rel="stylesheet" href="{{asset('css/xadmin.css')}}">
    <script src="{{asset('lib/layui/layui.js')}}" charset="utf-8"></script>
    <script type="text/javascript" src="{{asset('js/xadmin.js')}}"></script>
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                {{--<div class="layui-card-body ">--}}
                    {{--<form class="layui-form layui-col-space5">--}}
                        {{--<div class="layui-inline layui-show-xs-block">--}}
                            {{--<input type="text" name="search" placeholder="请输入类型名" autocomplete="off" class="layui-input"--}}
                                   {{--value="{{old('search')}}">--}}
                        {{--</div>--}}
                        {{--<div class="layui-inline layui-show-xs-block">--}}
                            {{--<button class="layui-btn" lay-submit="" lay-filter="sreach"><i--}}
                                        {{--class="layui-icon">&#xe615;</i></button>--}}
                        {{--</div>--}}
                    {{--</form>--}}
                {{--</div>--}}
                {{--<div class="layui-card-body">--}}
                    {{--<label>第 {{$period->name}} 期未抄列表</label>--}}
                {{--</div>--}}

                <div class="layui-card-body layui-table-body layui-table-main">
                    <table class="layui-table layui-form">
                        <thead>
                        <tr>
                            <th>楼栋</th>
                            <th>宿舍</th>
                            <th>表类型</th>
                            <th>表TID</th>
                            <th>最近读数</th>
                            <th>读数日期</th>
                            <th>当前状态</th>
                        </tr>
                        </thead>
                        <tbody>
                        @foreach($meters as $meter)
                            <tr>
                                <td>{{$meter->dorm->building->name}}</td>
                                <td>{{$meter->dorm->code}}</td>
                                <td>{{$meter->meter_type->name}}</td>
                                <td>{{$meter->nfc_id}}</td>
                                <td>{{$meter->last_reading}}</td>
                                <td>{{$meter->last_reading_date}}</td>
                                <td>{{$meter->active?'使用':'停用'}}</td>
                            </tr>
                        @endforeach
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script>

</script>
</html>